﻿namespace Webinator.Impls
{
    using System.Diagnostics.CodeAnalysis;
    using Interfaces;

    [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "Reviewed. Suppression is OK here.")]
    internal class MessagePoster : IMessagePoster
    {
        private readonly ICore _core;

        public MessagePoster(ICore core)
        {
            _core = core;
        }

        public void DisplayMessageInBrowser(string message, int interval)
        {
            _core.ExecuteScript(string.Format(Scripts.Message, message, interval));
        }
    }
}
